package Java.BlackHorse.IO;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class IODemo2 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("IO\\a.txt");
//      每次读取一个字节
//        fos.write(97);
//        fos.write(98);
//        读取字节数组
//        fos.write(new byte[]{97,98,99,100,101,102});
//          读取字节数组，从下标off开始读取len个字节
        fos.write(new byte[]{97,98,99,100,101,102},1,3);


        fos.close();
    }
}
